package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.EvaluationMapper;
import com.education.wisdom.pojo.Evaluation;
import com.education.wisdom.service.IEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 跟评中间 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-19
 */
@Service
public class EvaluationServiceImpl implements IEvaluationService
{
	@Autowired
	private EvaluationMapper evaluationMapper;

	/**
     * 查询跟评中间信息
     * 
     * @param gpId 跟评中间ID
     * @return 跟评中间信息
     */
    @Override
	public Evaluation selectEvaluationById(String gpId)
	{
	    return evaluationMapper.selectEvaluationById(gpId);
	}
	
	/**
     * 查询跟评中间列表
     * 
     * @param evaluation 跟评中间信息
     * @return 跟评中间集合
     */
	@Override
	public List<Evaluation> selectEvaluationList(Evaluation evaluation)
	{
	    return evaluationMapper.selectEvaluationList(evaluation);
	}
	
    /**
     * 新增跟评中间
     * 
     * @param evaluation 跟评中间信息
     * @return 结果
     */
	@Override
	public int insertEvaluation(Evaluation evaluation)
	{
	    return evaluationMapper.insertEvaluation(evaluation);
	}
	
	/**
     * 修改跟评中间
     * 
     * @param evaluation 跟评中间信息
     * @return 结果
     */
	@Override
	public int updateEvaluation(Evaluation evaluation)
	{
	    return evaluationMapper.updateEvaluation(evaluation);
	}

	/**
     * 删除跟评中间对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteEvaluationByIds(String ids)
	{
		return evaluationMapper.deleteEvaluationByIds(Convert.toStrArray(ids));
	}
	
}
